﻿using IntoNails.Infrastructure.InteractionRequests;
using Microsoft.Practices.Prism.ViewModel;

namespace IntoNails.Infrastructure.ViewModels
{
    public abstract class GenericInteractionViewModel<T> : NotificationObject, IGenericInteractionViewModel<T>
    {
        private T _interactionEntity;

        public T InteractionEntity
        {
            get { return this._interactionEntity; }
            set
            {
                this._interactionEntity = value;
                base.RaisePropertyChanged(() => InteractionEntity);
            }
        }

        public void SetEntity(T entity)
        {
            this.InteractionEntity = entity;
            base.RaisePropertyChanged(() => InteractionEntity);
        }

        public T GetEntity()
        {
            return this.InteractionEntity;
        }

        public virtual void ViewInvoked(object parameter)
        {

        }
    }
}
